
// axios.defaults.baseURL = 'https://autumnfish.cn'
import instance from '../utils/request'


// 获取轮播图数据
export const  getBanner = () => {
    return instance({
        url:'/banner',
        method:'GET'
    })
}

// 播放音乐
export const playMusic = params => {
    return instance({
        url:'/song/url',
        method:'GET',
        params
    })
}

// 搜索
export const search = params => {
    return instance({
        url:'/search',
        method:'GET',
        params
    })
}

// 登录
export const login = params => {
  return instance({
      url:'/login/cellphone',
      method:'GET',
      params
  })
}


// 登录
export const logout = () => {
    return instance({
        url:'/logout',
        method:'GET'
    })
}

// 登录验证码获取
export const loginCode = ({ phone }) => {
    return instance({
        url:'/captcha/sent',
        method:'GET',
        params: { phone }
    })
}

// 验证码登录
export const loginCodeIn = params => {
    return instance({
        url:'验证验证码',
        method:'GET',
        params
    })
}

// 登录key
export const logKey = () => {
    return instance({
        url:'/login/qr/key',
        method:'GET'
    })
}